import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryList } from '@/apis/layout'

export const useCategoryStore = defineStore('category', () => {
    const navList = ref([])
    const categoryList = () => {
        getCategoryList().then(res => {
            navList.value = res.data.result
        })
    }

    return { navList, categoryList, }
})
